<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../base/taglibs.jsp" %>
<ssm:overwrite name="style">
<link rel="stylesheet" href="${STATIC}/css/select2.css" />
</ssm:overwrite>
<ssm:overwrite name="context">
<form  class="form-horizontal"  action="user_status" method="POST">
	<div class="widget-body">
		<div class="widget-main">
			<div class="step-content row-fluid position-relative" >
					<h3 class="lighter block green">${WEB_TITLE}</h3>
						<div class="form-group">
							<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="id">id:</label>
							<div class="col-xs-12 col-sm-9">
								<div class="clearfix">
									<input  type="text" name="id" value="${userinfo.id}" class="col-xs-12 col-sm-6" ReadOnly />
								</div>
							</div>
						</div>
						<div class="space-2"></div>
						<div class="form-group">
							<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="name">name:</label>
							<div class="col-xs-12 col-sm-9">
								<div class="clearfix">
									<input  type="text" name="name" value="${userinfo.name}" class="col-xs-12 col-sm-4" ReadOnly />
								</div>
							</div>
						</div>
						<div class="space-2"></div>
						<div class="form-group">
							<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="age">age:</label>
							<div class="col-xs-12 col-sm-9">
								<div class="clearfix">
									<input  type="text" name="age" value="${userinfo.age}" class="col-xs-12 col-sm-4"  ReadOnly/>
								</div>
							</div>
						</div>
						<div class="hr hr-dotted"></div>
						<div class="form-group">
							<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="idcard">idcard:</label>

							<div class="col-xs-12 col-sm-9">
								<div class="clearfix">
									<input type="text" name="idcard" value="${userinfo.idcard}" class="col-xs-12 col-sm-5" ReadOnly />
								</div>
							</div>
						</div>
						<div class="space-2"></div>	
						<div class="form-group">
							<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="tel">tel:</label>

							<div class="col-xs-12 col-sm-9">
								<div class="clearfix">
									<input type="text" name="tel" value="${userinfo.tel}" class="col-xs-12 col-sm-8" ReadOnly />
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="qq">qq:</label>

							<div class="col-xs-12 col-sm-9">
								<div class="clearfix">
									<input type="text" name="qq" value="${userinfo.qq}" class="col-xs-12 col-sm-8" ReadOnly />
								</div>
							</div>
						</div>
			</div>
			<div class="row-fluid wizard-actions">
				<button class="btn btn-success btn-next" type="submit" >
					Finish
					<i class="icon-arrow-right icon-on-right"></i>
				</button>
			</div>
		</div><!-- /widget-main -->
	</div><!-- /widget-body -->
</form>
</ssm:overwrite>
<ssm:overwrite name="script">
<script src="${STATIC}/js/ace-extra.min.js"></script>

		<script src="${STATIC}/js/jquery.validate.min.js"></script>
		<script src="${STATIC}/js/jquery.maskedinput.min.js"></script>
		<!-- inline scripts related to this page -->
		
		
		
		<script type="text/javascript">
			jQuery(function($) {
			
			
			
				$.mask.definitions['~']='[+-]';
				$('#phone').mask('(999) 999-9999');
			
				jQuery.validator.addMethod("phone", function (value, element) {
					return this.optional(element) || /^\(\d{3}\) \d{3}\-\d{4}( x\d{1,6})?$/.test(value);
				}, "Enter a valid phone number.");
				
				
			
				$('#validation-form').validate({
					errorElement: 'div',
					errorClass: 'help-block',
					focusInvalid: false,
					rules: {
						id: {
							required: true
						},
						name: {
							required: true,
							//minlength: 5
						},
						age: {
							required: true,
							//minlength: 5,
							//equalTo: "#password"
						},
						idcard: {
							required: true,
							minlength: 18
						},
						tel: {
							required: true,
							phone: 'required'
						},
						qq: {
							required: false,
							//url: true
						}
					},
			
					messages: {
						id: {
							required: "系统问题"
						},
						name: {
							required: "name为必填."
							//minlength: "Please specify a secure password."
						},
						age: "age为必填.",
						idcard:{
							required:"idcard为必填.",
							minlength:"请输入18位身份证号码"
							
						} ,
						tel: "tel为必填.",
						qq: "qq为必填."
					},
			
					invalidHandler: function (event, validator) { //display error alert on form submit   
						$('.alert-danger', $('.login-form')).show();
					},
			
					highlight: function (e) {
						$(e).closest('.form-group').removeClass('has-info').addClass('has-error');
					},
			
					success: function (e) {
						$(e).closest('.form-group').removeClass('has-error').addClass('has-info');
						$(e).remove();
					},
			
					errorPlacement: function (error, element) {
						if(element.is(':checkbox') || element.is(':radio')) {
							var controls = element.closest('div[class*="col-"]');
							if(controls.find(':checkbox,:radio').length > 1) controls.append(error);
							else error.insertAfter(element.nextAll('.lbl:eq(0)').eq(0));
						}
						else if(element.is('.select2')) {
							error.insertAfter(element.siblings('[class*="select2-container"]:eq(0)'));
						}
						else if(element.is('.chosen-select')) {
							error.insertAfter(element.siblings('[class*="chosen-container"]:eq(0)'));
						}
						else error.insertAfter(element.parent());
					},
			
					submitHandler: function (form) {
						form.submit(); 
					},
					invalidHandler: function (form) {
					}
				});

			})
		</script>
</ssm:overwrite>
<jsp:include page="../base/base.jsp"></jsp:include>